import { Component } from 'react';
import './App.css';
class App extends Component {
  constructor() {
    super()
    this.state = {
      name: "李狗蛋",
      mobile: 110
    }
  }
  // 点击事件的函数
  fun = (e) => {
    
    // this.state.name = "王粪球"
    // console.log(this.state.name)
    this.setState({
      name: "王粪球"
    })
  }

  render() {
    const a = "德玛西亚"
    return (
      <div className="App">
        {a} 
        姓名：{this.state.name}
        电话：{this.state.mobile}
        <button onClick={this.fun}>点击</button>
      </div>
    );
  }
}

export default App;
